package com.study.system.service;

import com.study.system.entity.Logger;
import com.study.system.mapper.LoggerMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class LoggerService {

    @Resource
    private LoggerMapper loggerMapper;

    public List<Logger> getClubLog(Map<String, Integer> map) {
        Integer currentIndex = map.get("currentIndex");
        Integer pageSize = map.get("pageSize");
        return loggerMapper.getClubLogInfo(currentIndex, pageSize);
    }

    public Integer getClubTotal() {
        return loggerMapper.getClubLogTotal();
    }

    public List<Logger> getUserLog(Map<String, Integer> map) {
        Integer currentIndex = map.get("currentIndex");
        Integer pageSize = map.get("pageSize");
        return loggerMapper.getUserLogInfo(currentIndex, pageSize);
    }

    public Integer getUserTotal() {
        return loggerMapper.getUserLogTotal();
    }
}
